const Router=require('koa-router');
const router=new Router();
const message=require('./message');
const users=require('./users');
const homepage=require('./homepage');
const service = require('./service');
const community = require('./community');
const addWorks = require('./addWorks')
const foster = require('./foster');
const adopt = require('./adopt');
const addWorksPraise = require('./addWorksPraise')
const addComment = require('./addComment');
const addCommentPraise = require('./addCommentPraise');


router.use('/community', community.routes(), community.allowedMethods());//社区页
router.use('/service1', service.routes(), service.allowedMethods());//服务页
router.use('/addWorks', addWorks.routes(), addWorks.allowedMethods());//增加作品页
router.use('/foster', foster.routes(), foster.allowedMethods());//增加寄养作品页
router.use('/adopt', adopt.routes(), adopt.allowedMethods());//增加领养作品页
router.use('/addWorksPraise', addWorksPraise.routes(), addWorksPraise.allowedMethods());//增加作品点赞页
router.use('/addComment', addComment.routes(), addComment.allowedMethods());//增加寄养作品点赞页
router.use('/addCommentPraise', addCommentPraise.routes(), addCommentPraise.allowedMethods());//增加领养作品点赞页

router.redirect('/','/community')

router.use('/message',message.routes(),message.allowedMethods());
router.use('/users',users.routes(),users.allowedMethods());
router.use('/me-homepage',homepage.routes(),homepage.allowedMethods());
module.exports=router;